package nl.gamayun.whohasit;

import android.app.Dialog;
import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class DeleteDialog extends Dialog
{

	public DeleteDialog(Context context)
	{
		super(context);
		setupDialog(context);
	}

	public DeleteDialog(Context context, int theme)
	{
		super(context, theme);
		setupDialog(context);
	}

	private void setupDialog(Context context)
	{
		setContentView(R.layout.delete);

		// set the dialog text
		((TextView) findViewById(R.id.deleteTitle)).setText(R.string.delete_title);
		((TextView) findViewById(R.id.deleteMessage)).setText(R.string.delete_text);
		// set the confirm button
		Button cancelButton = (Button) findViewById(R.id.cancelButton);
		cancelButton.setOnClickListener(new View.OnClickListener()
		{
			public void onClick(View view)
			{
				dismiss();
			}
		});
		Button okButton = (Button) findViewById(R.id.okButton);
		okButton.setOnClickListener(new View.OnClickListener()
		{
			public void onClick(View view)
			{
				dismiss();
			}
		});
	}
}
